package cn.codelab.springcloudalibaba.study.step07.feign;

import cn.codelab.springcloudalibaba.study.step07.feign.fallback.EchoClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author Seven
 * @description
 * @博客：https://codelab7.cn
 * @Gitee https://gitee.com/it-codelab
 * @Copyright 公众号：Seven的代码实验室
 */
@FeignClient(name = "service-provider", fallback = EchoClientFallback.class)
public interface EchoClient {

    @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)
    String echo(@PathVariable("str") String str);
}